import { View, Text } from "@tarojs/components";
import Taro from "@tarojs/taro";

export default function Like() {
  const onToProducts = () => {
      Taro.switchTab({ url: '/pages/products/index' });
    }
  return (
    <View className="pb-[30px]">
      <View className="mx-2 bg-white px-3 py-3 rounded-md">
        <View className="flex items-center justify-between mb-2 py-1">
          <Text className="text-lg">猜你喜欢</Text>
          <Text className="text-xs text-gray-400 ml-2" onClick={onToProducts}>查看更多</Text>
        </View>
        <View className="grid grid-cols-2 gap-3">
          <View className="flex col-span-1 row-span-2 justify-between bg-[#F5F5F5] rounded-md px-3 py-3">
            <Text>商品1</Text>
          </View>
          <View className="flex col-span-1 row-span-1 min-h-[200px] justify-between bg-[#F5F5F5] rounded-md px-3 py-3">
            <Text>商品2</Text>
          </View>
          <View className="flex col-span-1 row-span-1 min-h-[200px] justify-between bg-[#F5F5F5] rounded-md px-3 py-3">
            <Text>商品3</Text>
          </View>
        </View>
      </View>
    </View>
  )
}

